package com.bjpowernode.crm.workbench.service.Impl;

import com.bjpowernode.crm.workbench.dao.ClueDao;
import com.bjpowernode.crm.workbench.domain.Clue;
import com.bjpowernode.crm.workbench.service.ClueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * ClassName:ClueServiceImpl
 * package:com.bjpowernode.crm.workbench.service.Impl
 * Description:
 *
 * @date: 2022-06-11 23:57
 * @author：lin
 */
@Service
public class ClueServiceImpl implements ClueService {
    @Autowired
    private ClueDao clueDao;



    @Override
    public boolean saveClue(Clue clue) {

        return clueDao.saveClue(clue);
    }

    @Override
    public Map<String, Object> searchClue(Map<String, Object> map) {
        Map<String,Object> pageMap =new HashMap<>();
       List<Clue> clueList =clueDao.searchClue(map);
       int count = clueDao.searchClueCount(map);
       pageMap.put("clueList",clueList);
       pageMap.put("count",count);



        return pageMap;
    }

    @Override
    public Clue searchClueById(String id) {


        return clueDao.searchClueById(id);
    }
}
